package xcmg.device.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import xcmg.device.dao.entity.purchase.PurchaseInvoiceApply;
import xcmg.device.dao.entity.purchaseInvoice.*;


import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface PurchaseInvoiceApplyMapper
{

	List<ResPurchaseInvoiceList> purchaseInvoiceList(@Param("invoiceList") ReqPurchaseInvoiceList reqPurchaseInvoiceList,@Param("orgId") String orgId);

	List<ResInvoiceApply> getApplyListInbound(@Param("invoiceApply") ReqPurchaseInvoiceApply reqPurchaseInvoiceApply,@Param("orgId") String orgId );

	List<ResInvoiceApply> getApplyListOut(@Param("invoiceApply") ReqPurchaseInvoiceApply reqPurchaseInvoiceApply,@Param("orgId") String orgId );

	List<ResInvoiceApply> getInAndOutApplyList(@Param("invoiceApply") ReqPurchaseInvoiceApply reqPurchaseInvoiceApply, @Param("orgId") String orgId);

	BigDecimal materielPriceOut(String id);


	PurchaseInvoiceApply selectByKey(@Param("apply") PurchaseInvoiceApply apply);

	void insert(PurchaseInvoiceApply apply);

	BigDecimal materielPriceEnter(String id);

    ResInvoiceApplyDetail invoiceApplyDetail(String invoiceApplyId);

	List<ResMaterialsInApply> materielsInApplyEnter(String invoiceApplyId);

	List<ResMaterialsInApply> materielsInApplyOut(String invoiceApplyId);

	List<PurchaseInvoiceApply> selectListByExact(@Param("apply") PurchaseInvoiceApply apply);

	List<ResMaterials> materiels(String invoiceApplyId);

	void update( PurchaseInvoiceApply apply);

	List<ResPurchaseInvoiceExport> exportDetailAll(@Param("searchParam") ReqPurchaseInvoiceExportParam condition, @Param("orgId") String orgId);
}
